package com.xlh.support.quiz.websocket.message;

import com.xlh.enums.WebsocketMessageEnum;
import com.xlh.websocket.message.Message;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author cheer
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class QuizMessage extends Message {

    /**
     * 提问Id
     */
    private Long quizId;

    /**
     * 题目
     */
    private String quizName;

    /**
     * 提问次数
     */
    private Integer quizNumber;

    @Builder
    public QuizMessage(Long userId, String username, Long quizId, String quizName, Integer quizNumber) {
        super.setType(WebsocketMessageEnum.QUIZ_ASK.getCode());
        super.setUserId(userId);
        super.setUsername(username);
        this.quizId = quizId;
        this.quizName = quizName;
        this.quizNumber = quizNumber;
    }
}
